package com.cws.controller.business;

import com.cws.enmu.RspCode;
import com.cws.model.Scenic;
import com.cws.utils.WSUtil;
import com.jfinal.core.Controller;

public class ScenicController extends Controller {

	public void getAll() {
		renderJson(WSUtil.createRsp(RspCode.SUCCESS, Scenic.dao.getAll()));
	}

	public void getSpotsByScenicId() {
		String scenicId = getPara();
		Scenic scenic = Scenic.dao.findById(scenicId);

		renderJson(WSUtil.createRsp(RspCode.SUCCESS, scenic.getSpots()));
	}
}
